<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.db.conn"%>
<%@ page import="java.sql.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
<jsp:include flush="true" page="${basePath}/admin/head.jsp"></jsp:include>
<link href="<%=path %>/admin/css/books-detail-new.css" rel="stylesheet">
 </head>

 <body class="ms-body ms-aside-left-open ms-primary-theme ms-has-quickbar">
    <!-- Body Content Wrapper -->
    <div class="ms-content-wrapper">
        <div class="row">
            <div class="col-md-12">
                <div class="books-detail-container">
                    <div class="books-detail-header">
                        <h6>查看小说信息</h6>
                    </div>
                    <div class="books-detail-content">
                        <div class="books-detail-info">
                            <% 			conn cn=new conn();
                            String id = request.getParameter("id");
                            String sql = "select  a.*,b.caname from books a  left join category b on a.caid=b.caid " +
                                    "  where bid=" + id ;
                            ResultSet rs = cn.query(sql);
                            rs.next();
                            %>
                            <div class="books-detail-item">
                                <span class="books-detail-label">小说类别：</span>
                                <span class="books-detail-value"><%=rs.getString("caname") %></span>
                            </div>
                            <div class="books-detail-item">
                                <span class="books-detail-label">小说名称：</span>
                                <span class="books-detail-value"><%=rs.getString("bname") %></span>
                            </div>
                            <div class="books-detail-item">
                                <span class="books-detail-label">作者：</span>
                                <span class="books-detail-value"><%=rs.getString("author") %></span>
                            </div>
                            <div class="books-detail-item">
                                <span class="books-detail-label">总字数(万)：</span>
                                <span class="books-detail-value"><%=rs.getString("words") %></span>
                            </div>
                            <div class="books-detail-item">
                                <span class="books-detail-label">价格：</span>
                                <span class="books-detail-value"><%=rs.getString("price") %></span>
                            </div>
                            <div class="books-detail-item">
                                <span class="books-detail-label">点击量：</span>
                                <span class="books-detail-value"><%=rs.getString("btotal") %></span>
                            </div>
                            <div class="books-detail-item">
                                <span class="books-detail-label">最后更新时间：</span>
                                <span class="books-detail-value"><%=rs.getString("btime") %></span>
                            </div>
                        </div>
                        
                        <div class="books-detail-cover">
                            <img src='<%=path %>/<%=rs.getString("bpic") %>' alt="小说封面" />
                        </div>
                        
                        <div class="books-detail-description">
                            <span class="books-detail-label">小说简介：</span>
                            <span class="books-detail-value"><%=rs.getString("bmemo") %></span>
                        </div>
                        
                        <div class="books-detail-actions">
                            <button class="btn-return" onclick="history.go(-1);">返 回</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <%
    if (rs != null)
        rs.close();
    if (cn != null)
        cn.close();
    %>   

    <!-- SCRIPTS -->
    <!-- Global Required Scripts Start -->
    <script src="<%=path %>/admin/js/jquery-3.3.1.min.js"></script>
    <script src="<%=path %>/admin/js/popper.min.js"></script>
    <script src="<%=path %>/admin/js/bootstrap.min.js"></script>
    <script src="<%=path %>/admin/js/perfect-scrollbar.js"> </script>
    <script src="<%=path %>/admin/js/jquery-ui.min.js"> </script>
    <!-- Global Required Scripts End -->
    <!-- Page Specific Scripts Start -->
    <script src="<%=path %>/admin/js/slick.min.js"> </script>
    <script src="<%=path %>/admin/js/moment.js"> </script>
    <script src="<%=path %>/admin/js/jquery.webticker.min.js"> </script>
    <script src="<%=path %>/admin/js/Chart.bundle.min.js"> </script>
    <script src="<%=path %>/admin/js/Chart.Financial.js"> </script>
    <!-- Page Specific Scripts Finish -->
    <!-- Page Specific Scripts Start -->
    <script src="<%=path %>/admin/js/datatables.min.js"> </script>
    <!-- Mednalytics core JavaScript -->
    <script src="<%=path %>/admin/js/framework.js"></script>
    <!-- Settings -->
    <script src="<%=path %>/admin/js/settings.js"></script>
  </body>
</html>


